package random;

import java.util.Random;

/*
* Rondom类:用来生成随机类
* public Random()
* public int nextInt()随机生成一个整数在整数范围内
*  public int nextInt(int bound)随机生成一个整数范围[0,bound)
* */
public class RandomDemo01 {
    public static void main(String[] args) {
        Random random = new Random();
        int x = random.nextInt();
        System.out.println(x);

        int i = random.nextInt(10);//随机生成一个[0,10)之间的整数
        System.out.println(i);
    }
}
